// index.js
// 获取应用实例
const app = getApp()
import {
    getCaCampPage
} from "../../api/place.js";
Page({
    data: {
      price:'',
        datalist: [],
        product: {
            value: 'all',
            options: [{
                    value: 'all',
                    label: '营地类型',
                },
                {
                    value: 'new',
                    label: '最新产品',
                },
                {
                    value: 'hot',
                    label: '最火产品',
                },
            ],
        },
        sorter: {
            value: 'default',
            options: [{
                    value: 'default',
                    label: '默认排序',
                },
                {
                    value: 'price',
                    label: '价格从高到低',
                },
            ]
        },
        // navigation: {
        //     type: '',
        //     showControls: true
        // },
    },
    // 事件处理函数
    bindViewTap() {
        wx.navigateTo({
            url: '../logs/logs'
        })
    },
    go: function (e) {
      // console.log('go',e);
      let id = e.currentTarget.dataset.id;
      id = JSON.stringify(id)
        wx.navigateTo({
            url: '../index/cartgroy/cartgroy?id='+id
        })
    },
    onLoad() {
        this.getCaCampPage()
    },
    getCaCampPage() {
        let data = {
            "pageNum": "1",
            "pageSize": "10",
            "id": null,
            "titleText": null,
            "latitude": null,
            "longitude": null,
            "position": null,
            "environmental": null,
            "photoUrl": null,
            "status": null,
            "delFlag": null,
            "createBy": null,
            "createTime": null,
            "updateBy": null,
            "updateTime": null,
            "remark": null
        }
        getCaCampPage(data).then(res => {
            let datalist = res.data.data.records
            this.setData({
                datalist:datalist
            })
        })
    },

})